﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wimm.Common.Entities;
using Wimm.Common.Interfaces.Utils;

namespace Wimm.Common.Interfaces.Repositories
{
    public interface IExpenseRepository : IRepository
    {
        Task<List<ExpenseCategory>> LoadAllCategories(int? parentId);
        Task<ExpenseCategory> LoadRootCategory(int categoryId);
        Task<ExpenseCategory> LoadCategoryById(int categoryId);
        Task<IPagedResult<Expense>> LoadPaged(IPagedRequest<Expense> request);
        Task<IReadOnlyCollection<CategoryGroup>> LoadGrouped(DateTime? fromFilter, DateTime? toFilter, int userId);
        Task<Expense> EditExpense(Expense newExpense);
        Task<Expense> InsertExpense(Expense newExpense);
        Task<IEnumerable<ExpenseCategory>> LoadCategories();
        Task<DateTime> GetLimitDate(bool isMaxDate);
    }
}
